Name | player places block |
Event Lines | player places block
player places <item> |
Triggers | when a player places a block. |
Example |
|
Example |
|
Example |
|
Example |
|
Has Player | Always. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
Switches | using:<hand_type> to only process the event if the player is using the specified hand type (HAND or OFF_HAND).
against:<location> to only process the event if block that this new block is being placed against matches the specified LocationTag matcher. type:<material> to only process the event if the block placed matches the MaterialTag matcher input. |
Contexts | <context.location> returns the LocationTag of the block that was placed.
<context.material> returns the MaterialTag of the block that was placed.
<context.old_material> returns the MaterialTag of the block that was replaced.
<context.item_in_hand> returns the ItemTag of the item in hand.
<context.hand> returns the name of the hand that the block was in (HAND or OFF_HAND).
<context.against> returns the LocationTag of the block this block was placed against.
|
Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
Group | Player |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/player/PlayerPlacesBlockScriptEvent.java#L18 |